The OPTION element can only occur within a SELECT element. It represents a possible choice. It can only contain text, together with SGML entities for accented characters etc.
ID
An SGML identifier used as the target for hypertext links or for naming particular elements in
associated style sheets. Identifiers are NAME tokens and must be unique within the scope of the current
document.
LANG
This is one of the ISO standard language abbreviations, e.g. "en.uk" for the variety of
English spoken in the United Kingdom. It can be used by parsers to select language specific choices for
quotation marks, ligatures and hyphenation rules. The language attribute is composed from the two letter
language code from ISO 639, optionally followed by a period and a two letter country code from ISO
3166.
CLASS
This a space separated list of SGML NAME tokens and is used to subclass tag names. By
convention, class names are interpreted hierarchically, with the most general class on the left and the most
specific on the right, where classes are separated by a period. The CLASS attribute is most commonly used
to attach a different style to some element, but it is recommended that where practical class names should be
picked on the basis of the element's semantics, because this permitsother uses, such as restricting search
through documents by matching on element class names. The conventions for choosing class names are
outside the scope of this document.
DISABLED
When present, the option should be rendered as normal, but can't be modified by the user. Where
practical the rendering should provide a cue that the option is disabled e.g. by graying out the text, changing
the color of the background or similar.
ERROR
This attribute specifies an error message explaining why the option is inappropriate. When this
attribute is missing, the option can be assumed to be ok. User agents are recommended to provide a cue to
indicate that the option is in error.
VALUE
The string to be used together with the name attribute of the enclosing select element, when
submitting the form. It defaults to the content of the OPTION element.
SELECTED
When present, this attribute signifies that the option should be initialized in its selected state. It is an
error for more than one option to be selected for single choice menus.
SHAPE
This attribute is used within menus to define shaped hotzones associated with this option's value.
The attribute value is a string that takes of the following forms:
<OPTION> is legal within:
<SELECT>
The following markup can be used within <OPTION>
none
Please see the Fill In Forms tutorial for examples.